package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.constant.OrderConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author : wenchao.long
 * @date : Created in 2020/12/13 11:39:21 周日
 * @description :
 */
@RestController
@RequestMapping("/consumer")
public class OrderController {
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/payment/zk")
    public String payment() {
        return restTemplate.getForObject(OrderConstant.PAYMENT_URL + "/payment/zk", String.class);
    }
}
